package com.lai.hospital.dao;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lai.hospital.dto.AppointmentDTO;
import com.lai.hospital.dto.ConfirmAppointmentDTO;
import com.lai.hospital.dto.MedicalInfoDTO;
import com.lai.hospital.entity.Appointment;
import com.lai.hospital.entity.Patient;
import com.lai.hospital.vo.ConditionVO;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author : lai
 * @version V1.0
 * @Project: hospital-springboot
 * @Package com.lai.hospital.dao
 * @Description: 预约dao
 * @date Date : 2022年11月27日 23:37
 */
@Repository
public interface AppointmentDao extends BaseMapper<Appointment> {
    List<AppointmentDTO> listAppointment(@Param("current") Long limitCurrent, @Param("size") Long size, @Param("conditionVO") ConditionVO conditionVO, @Param("startTime") Date startTime, @Param("endTime")Date endTime);

    List<MedicalInfoDTO> listAppointmentByPatientId(@Param("userId") Integer userId,@Param("patientId") Integer patientId);

    List<AppointmentDTO> listAppointmentByUserId(@Param("userId") Integer userId, @Param("conditionVO") ConditionVO conditionVO);


    AppointmentDTO getAppointmentById(@Param("id")Integer id);

    List<AppointmentDTO> listAppointmentByDoctorId(@Param("current") Long limitCurrent, @Param("size") Long size, @Param("conditionVO") ConditionVO conditionVO, @Param("startTime") Date startTime, @Param("endTime")Date endTime,@Param("doctorId") Integer doctorId);
}
